package com.wiserun.RestFul.model;

import com.alibaba.fastjson.annotation.JSONField;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;

public class Organization {
    private int id;
    private String oid;
    private String poidOrgAdmin;//  父机构ID
    private String status;
    private String stdisDeleted;
    private String code;
    private String name;
    @JSONField(format="yyyy-MM-dd'T'HH:mm:sss")
    private Date createdTime;
    @JSONField(format="yyyy-MM-dd'T'HH:mm:sss")
    private Date stopDate;
    @JSONField(format="yyyy-MM-dd'T'HH:mm:sss")
    private Date startDate;
    private String POIdOrgAdmin_TreeLevel;//机构层级
    private String PersonInCharge;//机构负责人
    private String POIdOrgReserve2_TreeLevel;//业务维度层级
    private  String leaderWithSpecificDuty;//分管领导
    public Organization() {
    }

    private List<Organization> children;

    public Organization(String oid, String poidOrgAdmin, String name) {
        this.oid = oid;
        this.poidOrgAdmin = poidOrgAdmin;
        this.name = name;
    }

    @Override
    public String toString() {
        return "Organization{" +
                "id=" + id +
                ", oid='" + oid + '\'' +
                ", poidOrgAdmin='" + poidOrgAdmin + '\'' +
                ", status='" + status + '\'' +
                ", stdisDeleted='" + stdisDeleted + '\'' +
                ", code='" + code + '\'' +
                ", name='" + name + '\'' +
                ", createdTime=" + createdTime +
                ", stopDate=" + stopDate +
                ", startDate=" + startDate +
                ", POIdOrgAdmin_TreeLevel='" + POIdOrgAdmin_TreeLevel + '\'' +
                ", PersonInCharge='" + PersonInCharge + '\'' +
                ", POIdOrgReserve2_TreeLevel='" + POIdOrgReserve2_TreeLevel + '\'' +
                ", leaderWithSpecificDuty='" + leaderWithSpecificDuty + '\'' +
                ", children=" + children +
                '}';
    }

    public String getPOIdOrgAdmin_TreeLevel() {
        return POIdOrgAdmin_TreeLevel;
    }

    public void setPOIdOrgAdmin_TreeLevel(String POIdOrgAdmin_TreeLevel) {
        this.POIdOrgAdmin_TreeLevel = POIdOrgAdmin_TreeLevel;
    }

    public String getPersonInCharge() {
        return PersonInCharge;
    }

    public void setPersonInCharge(String personInCharge) {
        PersonInCharge = personInCharge;
    }

    public String getPOIdOrgReserve2_TreeLevel() {
        return POIdOrgReserve2_TreeLevel;
    }

    public void setPOIdOrgReserve2_TreeLevel(String POIdOrgReserve2_TreeLevel) {
        this.POIdOrgReserve2_TreeLevel = POIdOrgReserve2_TreeLevel;
    }

    public String getLeaderWithSpecificDuty() {
        return leaderWithSpecificDuty;
    }

    public void setLeaderWithSpecificDuty(String leaderWithSpecificDuty) {
        this.leaderWithSpecificDuty = leaderWithSpecificDuty;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getOid() {
        return oid;
    }

    public void setOid(String oid) {
        this.oid = oid;
    }

    public String getPoidOrgAdmin() {
        return poidOrgAdmin;
    }

    public void setPoidOrgAdmin(String poidOrgAdmin) {
        this.poidOrgAdmin = poidOrgAdmin;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStdisDeleted() {
        return stdisDeleted;
    }

    public void setStdisDeleted(String stdisDeleted) {
        this.stdisDeleted = stdisDeleted;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getStopDate() {
        return stopDate;
    }

    public void setStopDate(Date stopDate) {
        this.stopDate = stopDate;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public List<Organization> getChildren() {
        return children;
    }

    public void setChildren(List<Organization> children) {
        this.children = children;
    }

    public static void main(String[] args) throws ParseException {
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
        Date  parse = df.parse("9999-12-31T22:59:59");
        String format1 = df.format(new Date());
        System.out.println(format1);
        DateFormat df2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String format = String.format("%tT", parse);
        System.out.println(format);
        Calendar calendar = new GregorianCalendar();

        calendar.setTime(new Date());

        calendar.add(calendar.DATE,1);

        String date2= df.format(calendar.getTime());

        System.out.println(date2);
    }
}
